<template>
    <div>
        <van-nav-bar title="首页" />
        <van-search v-model="value" placeholder="请输入搜索关键词" />
        <van-tabs v-model:active="active">
            <van-tab title="精选">
                <van-swipe :autoplay="3000" lazy-render>
                    <van-swipe-item v-for="image in images" :key="image">
                        <img :src="image" style="width: 100%;height: 200px;" />
                    </van-swipe-item>
                </van-swipe>
                <van-grid :border="false" :column-num="3">
                    <van-grid-item>
                        <van-image src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-5.jpeg" />
                    </van-grid-item>
                    <van-grid-item>
                        <van-image src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-6.jpeg" />
                    </van-grid-item>
                    <van-grid-item>
                        <van-image src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-7.jpeg" />
                    </van-grid-item>
                </van-grid>
                <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
                    thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg" />
                <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
                    thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg" />
                <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
                    thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg" />
            </van-tab>
            <van-tab title="本地">本地</van-tab>
            <van-tab title="新车">新车</van-tab>
            <van-tab title="原创">原创</van-tab>
        </van-tabs>

    </div>
</template>

<script setup>
const images = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
];
</script>

<style lang="scss" scoped></style>